package guoanmaker.operator.business.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import guoanmaker.operator.business.model.OperatorActivityPrice;
import guoanmaker.operator.business.repository.OperatorActivityPriceRepository;

/**
 * @author wanghongwei 
 * @ClassName: OperatorActivityPriceService 
 * @Description: OperatorActivityPriceService
 * @date 2017/12/13
 */
@Service
public class OperatorActivityPriceService implements OperatorActivityPriceServiceInterface {
	@Autowired
	private OperatorActivityPriceRepository activityPriceRepository;
	/**
	 * 保存订单价格表数据
	 */
	public OperatorActivityPrice savaActivityPrice(OperatorActivityPrice activityPrice){
	 activityPrice.setSellNum(0);
	 return  activityPriceRepository.save(activityPrice);
	}
	@Transactional
	@Override
	public void DeleteActivityPrice(String id) {
		activityPriceRepository.delete(id);
	}
	
	
	@Override
	public List<OperatorActivityPrice> selectOperatorActivityPrice(String activityId) {
		return activityPriceRepository.selectOperatorActivityPrice(activityId);
	}
	

}
